package tag.control;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork.ActionSupport;

@SuppressWarnings("serial")
public class IteratorTagAction extends ActionSupport {

	private List<String> myList1;
	private List<String> myList2;
	private List<String> myList3;

	public List<String> getMyList1() {
		return myList1;
	}

	public List<String> getMyList2() {
		return myList2;
	}

	public List<String> getMyList3() {
		return myList3;
	}
	
	public String execute() throws Exception {
		return null;
	}

	private void initLists() {
		myList1 = new ArrayList<String>();
		myList1.add("1");
		myList1.add("2");
		myList1.add("3");

		myList2 = new ArrayList<String>();
		myList2.add("a");
		myList2.add("b");
		myList2.add("c");

		myList3 = new ArrayList<String>();
		myList3.add("A");
		myList3.add("B");
		myList3.add("C");
	}

	public String append() throws Exception {
		this.initLists();
		return "append";
	}

	public String merge() throws Exception {
		this.initLists();
		return "merge";
	}
	
	public String subset() throws Exception {
		this.initLists();
		return "subset";
	}
}